import requests
import pandas as pd
import io
import os
from datetime import datetime
from loguru import logger
from tools.LightCurveDownloader import LightCurveDownloader

if __name__ == "__main__":
    downloader = LightCurveDownloader(
        base_url="http://192.168.16.70:8082/api/query_light_curve_xp_version_V20250303_KM",
        query_defaults={
            "band": "r",
            "radius": 1.0,
            "date_": "2023-01-01",
            "download": False
        },
        save_dir="downloaded_light_curves"
    )

    targets = [
        {"ra": "21:29:58.33", "dec": "+12:10:01.2"},
        {"ra": "12:34:56.78", "dec": "-05:43:21.0"},
        {"ra": "02:15:22.11", "dec": "+45:12:32.0"},
    ]

    downloader.query_all_targets(targets)
